<template>
  <div>
    <div class="header_box">
      <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="search_ipt">
      <span class="iconfont ">&#xe632;</span>
    </div>
    <router-link to="/city">
    <div class="city">
      {{this.city}}
       <span class="iconfont arrow-icon">&#xe64a;</span>
      </div>
      </router-link>
   </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "Header",
  data() {
    return {};
  },
  computed: {
    ...mapState(["city"])
  }
};
</script>

<style lang="stylus" scoped>
.header_box {
  width: 100%;
  height: 0.86rem;
  line-height: 0.86rem;
  background: #00bcd4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  .back-icon {
    float: left;
    font-size: 12px;
    color: #fff;
    padding: 0 0.1rem;
  }
}

.search_ipt {
  flex: 1;
  height: 0.55rem;
  line-height: 0.55rem;
  border-radius: 3px;
  background: #fff;
  color: #555;
}

.header_box {
  width: 100%;
  height: 0.86rem;
  line-height: 0.86rem;
  background: #00bcd4;

  .back-icon {
    font-size: 12px;
    color: #fff;
  }
}

.city {
  color: #fff;
}
</style>